package com.cjw.enums;

public enum ErrorCode {
    USER_OR_PASSWORD_INVALID("用户名或密码错误", 401),
    USER_ID_NOT_FOUND("用户id不存在", 500),
    ROLE_ID_NOT_FOUND("角色id不存在", 500),
    NOT_LOGIN("未登录",500),
    NOT_AUTHORITY("没有该权限",500),
    TWO_PASSWORD_NOT_SAME("两次密码不一致",500),
    PASSWORD_LENGTH_NOT_LAWFUL("密码长度不合法",500),
    PHONE_EXISTED("电话号码已存在",500),
    PHONE_NOT_LAWFUL("电话号码不合法",500),
    TYPE_ERROR("类型错误",500),
    HTTP_ERROR("matomo调用失败",500),
    CONNECT_ERROR("matomo连接失败",500),
    BANED("已被封禁",500);

    private String msg;
    private int code;

    ErrorCode(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
